﻿using System.Windows;
using System.Windows.Controls;
using Silverlight.Windows.Controls;

namespace Sample
{
    public partial class SecondaryWindow : UserControl
    {
        public SecondaryWindow()
        {
            InitializeComponent();
            DataContext = new RoutedCommand((s,e) => { });
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var child = new ChildWindow { Title = "Child Window" };
            child.Content = new TextBlock { Text = "Content" };
            child.SetWindow(Window.GetWindow(this));
            child.Show();
        }
    }
}
